package com.ss.android.article.base.feature.update.a;

import com.ss.android.common.AbsApiThread;
import com.ss.android.newmedia.a.MediaItem;
import org.json.JSONObject;

public final class c implements MediaItem {
    public final long a;
    public long b;
    public String c;
    public UserInfo d;
    public UserInfo e;
    public long f;
    public int g;
    public boolean h;
    public boolean i;
    private final String j;

    public c(long arg4) {
        this.a = arg4;
        String v0 = arg4 > 0 ? String.valueOf(arg4) : "";
        this.j = v0;
    }

    public static c a(JSONObject arg8) {
        c v0 = null;
        int v2 = 0;
        if(arg8 != null) {
            long v4 = arg8.has("id") ? arg8.optLong("id") : arg8.optLong("comment_id");
            if(v4 <= 0) {
                return v0;
            }

            c v1 = new c(v4);
            v1.b = arg8.optLong("create_time");
            v1.c = arg8.optString("content");
            v1.d = UserInfo.fromJO(arg8.optJSONObject("user"), false);
            v1.e = UserInfo.fromJO(arg8.optJSONObject("reply_user"), false);
            v1.f = arg8.optLong("reply_id");
            v1.g = arg8.optInt("digg_count", 0);
            v1.h = AbsApiThread.optBoolean(arg8, "user_digg", false);
            v1.i = AbsApiThread.optBoolean(arg8, "is_pgc_author", false);
            if(v1.d != null) {
                v2 = 1;
            }

            if(v2 == 0) {
                return v0;
            }

            v0 = v1;
        }

        return v0;
    }

    public final String getItemKey() {
        return this.j;
    }

    public final boolean skipDedup() {
        return false;
    }
}

